Many microprocessors and other computing devices have multiple processors or cores, and are thus able to perform multiple concurrent tasks. Although different systems have different architectures, tasks are typically queued with different priorities or resource requirements, and scheduling algorithms are used to dynamically assign individual tasks to individual processors based on the priorities or required resources of the tasks.
Because tasks have different priorities and processor affinities, it is common for a processor to be interrupted as it is performing a particular task, and instructed to perform a task having a higher priority with respect the processor. When this happens, the currently executing task is preempted and put back into a queue, where it can be picked up again later by another processor.
In some situations, processors may have different capabilities or responsibilities, and certain tasks, referred to herein as high priority tasks, may require execution by particular processors. Tasks that have been preempted by high priority tasks may be immediately resumed by other processors that are currently idle or that are running lower priority tasks.
In order to preempt an executing task in favor of a high priority task, a scheduling component may send what is known as an inter-processor interrupt or IPI to the processor upon which the high priority task is to execute. An IPI is a signaling mechanism implemented within a multiprocessor architecture that allows different processors to interrupt each other.
Upon receiving the IPI, the processor preempts and queues the current task so that other processors can be given the opportunity to resume the task. In addition, the interrupted processor sends additional IPIs to idle processors of the system. These additional IPIs cause the idle processors to wake up and examine relevant task queues for the availability of new tasks. As a result of these activities, the interrupted processor begins executing the high priority task, and one of the previously idle processors eventually begins executing the preempted task.